package com.shiyou.boke.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户安全信息表
 * </p>
 *
 * @author author
 * @since 2025-07-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("boke_user_security")
public class BokeUserSecurity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 关联的用户ID
     */
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    /**
     * 密码盐值
     */
    private String passwordSalt;

    /**
     * 最后登录IP
     */
    private String lastLoginIp;

    /**
     * 最后登录时间
     */
    private LocalDateTime lastLoginTime;

    /**
     * 登录失败次数
     */
    private Integer loginAttempts;

    /**
     * 账号锁定截止时间
     */
    private LocalDateTime lockedUntil;

    /**
     * 双因素认证密钥
     */
    private String twoFactorSecret;


}
